#region ... Copyright Notice ...
/*
   Copyright 2006-2008 Provo Labs    http://www.provolabs.com

	Author: Tyler Jensen    http://www.tsjensen.com/blog
	Released by the author with written permission of Provo Labs

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
#endregion

using System;
using System.Collections.Generic;
using System.Net;
using System.Text;

namespace Atrax.Html
{
	[Serializable]
	public class HtmlPage
	{
		private string url = "";
		private List<string> redirects = new List<string>();
		private byte[] data = null;
		private WebHeaderCollection headers = new WebHeaderCollection();
		//private List<KeyValuePair<string, string>> headers = new List<KeyValuePair<string, string>>();
		private string status = "";
		private string version = "";
		private int statusCode = -1;
		private bool hasError = false;
		private string error = "";
		private int errorCode = -1;
		private string contentType = "";
		private bool complete = true;

		public string Url { get { return url; } set { url = value; } }
		public List<string> Redirects { get { return redirects; } set { redirects = value; } }
		public byte[] Data { get { return data; } set { data = value; } }
		public WebHeaderCollection Headers { get { return headers; } set { headers = value; } }
		public string Status { get { return status; } set { status= value; } }
		public string Version { get { return version; } set { version = value; } }
		public int StatusCode { get { return statusCode; } set { statusCode = value; } }
		public bool HasError { get { return hasError; } set { hasError = value; } }
		public string Error { get { return error; } set { error = value; } }
		public int ErrorCode { get { return errorCode; } set { errorCode = value; } }
		public string ContentType { get { return contentType; } set { contentType = value; } }
		public bool Complete { get { return complete; } set { complete = value; } }

		public override string ToString()
		{
			return url + " " + statusCode;
		}
	}

}
